{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<div class="main">
<div class="main_title">{%EDIT} <a href="{:u("PurposeCateType/index")}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">{%TYPE_NAME}:</td>
		<td class="item_input"><input type="text" class="textbox require" name="name" value="{$vo.name}" /></td>
	</tr>
	<tr>
		<td class="item_title">首页图片:</td>
		<td class="item_input">
			<html:imgUpload name = 'preview' id='preview' value='$vo.preview'/>
		</td>
	</tr>
	<tr>
		<td class="item_title">{%CATE_NAME}:</td>
		<td class="item_input">
			<select name="cate_id">
			<foreach name="cate_list" item="cate_item">
				<option value='{$cate_item.id}' <if condition="$cate_item['id'] eq $vo['cate_id']">selected="selected"</if>>{$cate_item.name}</option>
			</foreach>
			</select>
		</td>
	</tr>
	<tr>
		<td class="item_title">{%SORT}:</td>
		<td class="item_input"><input type="text" class="textbox" name="sort" value="{$vo.sort}" /></td>
	</tr>
	<tr>
		<td class="item_title">{%DEAL_CITY}:</td>
		<td class="item_input">
			<php>$idx = 1;</php>
			<foreach name="city_list" item="city_item">
				<if condition="$city_item['pid'] neq 0">
				<php>if($idx!=1){</php>
				<div class="blank5"></div>
				<div style="border-bottom:solid 1px #ccc;"></div>
				<php>}</php>
				<label>{$city_item.name}：<input type="checkbox" name="city_id[{$city_item.id}]" value="{$city_item.id}" <if condition="$city_item['info']">checked="checked"</if> /></label>
				<label>{$city_item.name}首页推荐：<input type="checkbox" name="recommend[{$city_item.id}]" value="1" <if condition="$city_item['info']['recommend'] eq 1">checked="checked"</if> /></label>
				{$city_item.name}首页推荐排序：<input type="text" class="textbox" name="rec_sort[{$city_item.id}]" value="<if condition="$city_item['info']['rec_sort']">{$city_item.info.rec_sort}<else/>0</if>" />
				<php>$idx++;</php>
				</if>
			</foreach>
		</td>
	</tr>
	
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="id" value="{$vo.id}" />
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="PurposeCateType" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%EDIT}" />
			<input type="reset" class="button" value="{%RESET}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>
<include file="Public:footer" />